package service

import (
	sqlc "bgs/db/sqlc"
	"context"
)

func (s *OrderServiceImp) ListOrderDetailPtrsByOrderID(ctx context.Context, q *sqlc.Queries, orderID int64) (orderDetailPtrs []*sqlc.OrderDetail, err error) {
	orderDetails, err := q.ListNormalOrderDetailsByOrderID(ctx, orderID)
	if err != nil {
		return
	}
	orderDetailPtrs = s.MapOrderDetailEntityToPtr(orderDetails)
	return
}
